import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 ******************************************
 * @author HuangFeng [2018年1月30日 下午5:34:22]
 * @version 1.0
 ******************************************
 */
public class Thread1 extends Thread {

	String dizhi = "";

	/**
	 ******************************************
	 * @author HuangFeng [2018年1月30日 下午5:44:02]
	 * @version 1.0
	 ******************************************
	 */
	public Thread1(String dizhi) {
		this.dizhi = dizhi;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Thread#run()
	 */
	@Override
	public void run() {
		Date begin = null;
		Date end = null;
		tiao:
		for (String zhunkao : Mianshi.zhunkaozhen) {
			try {
				begin = new SimpleDateFormat("yyyy-MM-dd").parse("1993-01-01");
				end = new SimpleDateFormat("yyyy-MM-dd").parse("1996-12-31");
			} catch (ParseException e) {
				e.printStackTrace();
			}
			for (; begin.getTime() < end.getTime(); begin = Mianshi.nextDay(begin)) {
				for (int i = 0; i < 1000; i++) {
					String haoma = dizhi + Mianshi.format(begin) + String.format("%03d", i);
					int o = 0;
					for (int s = 0; s < 17; s++)
						o += Integer.parseInt(haoma.substring(s, s + 1)) * Mianshi.d[s];
					String h = Mianshi.sd[o % 11];
					if (h.equals("X") || Integer.parseInt(h) % 2 == 0) {
						haoma += h;
						System.out.println(haoma);
						if (Mianshi.chaxun(zhunkao, haoma)) {
							System.out.println("==================================================================================");
							continue tiao;
						}
					}
				}
			}
		}
	}
}
